package kuzha.code;

import kuzha.KuzhaEngine;
import kuzha.ast.Statement;

public abstract class CodeBuilder {
	private KuzhaEngine engine;
	private String pname;
	
	public CodeBuilder(KuzhaEngine engine, String pname) {
		if (engine == null || pname == null)
			throw new IllegalArgumentException();
		this.engine = engine;
		this.pname = pname;
	}
	
	public KuzhaEngine getEngine() {
		return this.engine;
	}
	public String getProgramName() {
		return this.pname;
	}
	
	public abstract CodeBlock newCodeBlock(Statement node) throws CompileException;
}
